using System.Windows;

namespace MetaView;

/// <summary>
/// Internal implementation of IResourceService.
/// </summary>
internal class InternalResourceService : IResourceService
{
    private readonly WpfApplication application;

    public InternalResourceService(WpfApplication metaviewWpfApplication)
    {
        this.application = metaviewWpfApplication;
    }

    public void AddResourceDictionary(ResourceDictionary resourceDictionary)
    {
        this.application.Resources.MergedDictionaries.Add(resourceDictionary);
    }

    public object TryFindResource(object resourceKey)
    {
        return this.application.TryFindResource(resourceKey);
    }
}
